<!DOCTYPE html>
<html lang="en">
    <head>
        <title>component-3 组件-父子组件</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <script type="text/javascript" src="../assets/js/vue.js"></script>
    </head>
    <body>
        <h1>component-3 组件</h1>
        <p>写子组件，要在父组件中挂载</p>
        <hr>
        <div id="app">
            <heheda2></heheda2>
        </div>
        <script type="text/javascript">
            let heheda1={
                template:`<div>我是子</div>`
            }
            let heheda2={
                template:`<div>
                        <div>panda form China!</div>
                        <heheda1></heheda1>
                        </div>`,
                components:{
                     'heheda1':heheda1
                }
            }
            var app=new Vue({
                el:'#app',
                components:{
                    'heheda2':heheda2
                }
            })
        </script>
    </body>
</html>